class Api::V1::PhoneUserController < ApplicationController
  #before_action :authenticate
  
  def create 
	p = PhoneUser.new
	
	p.username = params[:username]
	p.userpass = "Admin01"
	p.api_key = "1111"
	p.email = params[:email]
	p.name = params[:name]
	p.lastname = params[:lastname]
	p.facebookid = params[:facebookid]
	p.status=1
	p.createdTime = Time.now
					
	p.save
  end
  
  def index
	@s = PhoneUser.all
	render :json => @s
  end

  def show
	@s = PhoneUser.find( params[:id] )
    render :json => @s
  end
end